#include "layout-register.h"

//Win layout new function define:
Layout *main_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *setting_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *diandu_layout_new(GooCanvasItem * parent,gpointer sms);

/*st*/
Layout *lan_setting_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *wifi_setting_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *teacher_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *subject_layout_new(GooCanvasItem * parent,gpointer sms);
/*st*/

Layout *test2_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *medialib_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *linvideo_layout_new(GooCanvasItem * parent,gpointer sms);
//Layout *teacher_style_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *test_layout_new(GooCanvasItem * parent, gpointer sms);
//Item layout new function define:
Layout *taskbar_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *introduction_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *promptbar_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *video_list_layout_new(GooCanvasItem * parent,gpointer sms);
Layout *top_list_layout_new(GooCanvasItem * parent,gpointer sms);


//////////////////////////////////////////////////////////////

Layout *layout_register_new_by_win_id(GooCanvasItem * parent,LAYOUT_WIN_ID win_id,gpointer sms)
{
	switch (win_id)
	{
		case LAYOUT_WIN_MAIN:
			return main_layout_new(parent,sms);
		case LAYOUT_WIN_SETTING:
			return setting_layout_new(parent,sms);
		/*st*/
		case LAYOUT_WIN_DIANDU:
		    return diandu_layout_new(parent ,sms);
		case LAYOUT_WIN_LAN_SETTING:
		    return lan_setting_layout_new(parent ,sms);
		case LAYOUT_WIN_WIFI_SETTING:
		    return wifi_setting_layout_new(parent ,sms);
		case LAYOUT_WIN_TEACHER:
			return teacher_layout_new(parent ,sms);
		case LAYOUT_WIN_TEACHER_SUBJECT:
			return subject_layout_new(parent ,sms);
		/*st*/


		case LAYOUT_WIN_INTRODUCTION:
			return introduction_layout_new(parent, sms);
		case LAYOUT_WIN_TEST:
			return test_layout_new(parent, sms);
		case LAYOUT_WIN_VIDEO_LIST:
			return video_list_layout_new(parent, sms);
    case LAYOUT_WIN_TOP_LIST:
       return top_list_layout_new(parent, sms);
		default :
			break;
	}
	return NULL;
}

Layout *layout_register_new_by_item_id(GooCanvasItem * parent,LAYOUT_ITEM_ID item_id,gpointer sms)
{
	switch (item_id)
	{
		case LAYOUT_ITEM_PROMPTBAR:
			return promptbar_layout_new(parent, sms);
		case LAYOUT_ITEM_TASKBAR:
			return taskbar_layout_new(parent,sms);
		default :
			break;
	}
	return NULL;
}
